import request from '../../utils/request'

const api_patient = '/api/user/patient'


//查询所有
export function getPatientList() {
    return request({
        url: `${api_patient}/list`,
        method: 'get',
    })
}


//根据id查询
export function getPatientById(id) {
    return request({
        url: `${api_patient}/get/${id}`,
        method: 'get',
    })
}


//添加
export function addPatient(data) {
    return request({
        url: `${api_patient}`,
        method: 'post',
        data
    })
}

//修改
export function editPatient(data) {
    return request({
        url: `${api_patient}`,
        method: 'put',
        data
    })
}


//删除
export function delPatientByIds(id) {
    return request({
        url: `${api_patient}/${id}`,
        method: 'delete',
    })
}